package com.xian.im.message.queue;

import com.xian.im.message.model.QueueMsg;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @program: xian-code
 * @description:  消息回执消息队列
 * @author: liru.xian
 * @create: 2021-01-19 14:46
 **/
public class MessageLoginQueue {

    private static LinkedBlockingQueue<QueueMsg> QUEUE = new LinkedBlockingQueue<QueueMsg>();
    
    public static QueueMsg take(){
        try {
            return QUEUE.take();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static void  put(QueueMsg obj){
        try {
            QUEUE.put(obj);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
